package com.mmy.dao.ship;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mmy.domain.ship.VShipPort;

public interface VShipPortRepository extends JpaRepository<VShipPort, Integer> {

	/*
	 * 根据name查找
	 */
	@Query(value = "select *  from vShipPort where cPortName like %:strPortName%", nativeQuery = true)
	List<VShipPort> findByPortName(@Param("strPortName") String strPortName);

	/*
	 * 根据id查找
	 */
	@Query(value = "select *  from vShipPort where iZoneID = :zoneID", nativeQuery = true)
	List<VShipPort> findport(@Param("zoneID") int zoneID);

}
